<?php

namespace app\api\controller;

use think\Controller;

class Classes extends Father
{
    //分类接口
    public function classes(){
        $return = [
            'data'=>'',
            'message'=> "没有分类信息",
            'success' => false,

        ];
        $data = model('Classes')->order('weight asc update_time desc')->select();
        $data = $data->toArray();

        if ($data){

            $return['data'] = $data;
            $return['message'] = '查询成功';
            $return['success'] = true;

        }
        return json($return);

    }
}
